059 counter usage
您好,在这个视频中,我们将继续学习一种编程语言,我们将学习计数器,我们如何在其编程语言中使用计数器?
Hello, in this video, we will continue to learn a programming language and we will learn counters, how can we use counters in its programming language?
我创建了一种新的可能不是单元编程语言,我将创建我的模拟器,并且我也将打开我的模拟器。
I created a new may not be a cell programming language, and I will create my simulator and I will open my simulator also.
让我们从计数器开始,然后我们要做什么?
Let's start with the counter and then what will we do?
例如,我们将进行逆向操作。
We will do, for example, up counter.
好的,现在已经开始了,我们将继续。
OK, now this is opening and we will continue.
只是我们需要再等一会儿。
Just we need to wait a little bit more.
我会说,它正试图取消,不是现在,我会在这里打字,再见。
It is trying to, I will say, cancel, not now and I will type here, see you.
好的,然后这是递增计数器,如果我将此递增计数器编辑到这里,它就是数据块。
OK, and then this is up counter and if I edit this up counter to here it is to data block.
我会说,例如,统计数据块,好吗?
And I will say, for example, count up data block, OK?
这将添加到这里。
And this will be added to here.
您可以看到统计数据,插入程序资源。
You can see count up data, plug in program resources.
现在让我们定义我们的变量,我们需要什么,重置和 Pravy 作为整数,并构建一个整数,这样我们就可以去查看税收,我会说显示所有类型。
And now let's define our variables, what we need up and reset and Pravy as integer and build out an integer out so we can go to see tax and I will say show all types.
首先,我要说的是计数。
And first of all, I will say count up.
并且无法重置,但是第一件事就是零点零零点一然后,例如计数器。
And can't reset, but the first thing and zero point zero zero point one and then, for example, counter.
例如,活动的、激活的,假设这是我们需要在这里定义的输出和计数器值,好的,这将是整数。
For example, active, activated, let's say this is our output and counter value that we need to define in here, OK, this will be in integer.
例如,这将是 M w 2,但不是像这样的 m w 2,而且这将是在这样的时候。
And this will be M w two, for example, but not like this m w two, and this will be in times like this.
好的,这是正确的。
OK, that's correct.
现在让我们去 B 和 Ed 听听我们听到了什么。
And now let's go to B once and Ed to hear what we hear.
我们有一个输入计数,好吗?
We have a count of input, OK?
计数。
Count up.
这是我们的输入,也是我们需要的,这是我们的,这是我们的计数,但是,嗯,我会检查一次。
This is our input and what we need to right here, this is our this is our count up, but, um, I will check once.
这是正确的吗,比尔?
Is it correct, Bill?
这是一个零点零。
This is a zero point zero.
以及重置计数。
And for the reset count.
嗯,重置比尔在这里并且作为整数计数器。
Um, reset Bill is here and as integer counter.
当你在这里并在这里时,我会说计数器已激活,我现在要做的就是,这可以是空的。
While you're here and in here, I would say counter activated and what I am going to do now, this can be empty.
好的,现在就可以了。
OK, so now this is OK.
这是对的。
This is correct.
我会推迟这一时间,然后我也会这样做。
And I will delay this one and I will then it is also.
现在它已得到纠正,现在我将继续编写我们的程序,如果我们可以说计数器已激活,然后,例如,我们可以说什么?
Now it's corrected and now I will continue to write our program, if we can say counter activated and then, for example, what can we say, for example?
嗯,我们可以在这里说。
Um, we can say in here.
我们可以在定时器上使用定时器。
We can use a timer on timer.
好的,好的,在这个计时器和这个计时器输入上,我们需要说,嗯,再说一遍,我们可以,但这不是一个很好的例子。
OK and OK at this timer and this timer input, we need to say, um, again, we can to if but this is not a good example in here.
也许我们可以增加价值。
Maybe we can increase value.
嗯。
Um.
价值加一。
Value plus one.
好的,这个和这个定义了这个值。
OK, and this and this define this value.
定义一个类型,这样就可以了,这是暂时的局部温度,所以你可以看到这个标志是到这里的标志。
Is define a type, this will be OK and this is a local temperature for a moment, so you can see this sign is a sign to here.
你可以看到当地的温度在这里,现在我将把这个项目下载到我的模拟器上,我们将看到这个国家将去反击我们的音量。
You can see local temperature is here and now I will do a download this project to my simulator and we will see this country is going to go to counter up counter tilt our volume.
你将控制我们创建的整数是整数数据类型。
Which will you control that we created integer is integer data type.
现在就准备好了。
Now it will be ready then.
现在准备好并加载配置和启动模块。
Ready now and loading a configuration and start modules.
好的,现在就完成。
OK, and finish now.
嗯,我会先上线,你可以看到。
Um I will go on line first of all and you can see.
该区域必须是绿色的。
This area must be green.
好的,现在结果为真,为什么这是假,这是假,计数器值为零,因为为零。
OK, so now the result is true why this is false and this is false and counter value is zero because of the zero.
是真的。
It is true.
让我们改变这个计数器的值,例如,对于 OK,现在它是 4,结果暂时为 false。
Let's change this counter value, for example, to for example, for OK, now it's four and the result is false for a moment.
这个值是一个,因为为什么第一次,因为这个值,折扣值是零。
And the value is one because of why in the first time, because of this value, a discounted value was zero.
因此它被激活。
Because of this it's activated.
所有这些 if 循环都运行一次,因此,它是一个。
All this if loop is run once because of this, it is one.
现在我将激活计数然后开始。
So now I will activate count up then let's start.
这是一件事,第二件事是。
This is one and the second thing is to.
第三个,好的,现在检查这里,好的,这是错误的,现在你可以看到它是四次和四次,我们向上走,它要求结果是好的,正确的,这是真的。
And the third one, OK, and now check here, OK, this is false, and now you can see it is for it's four and four time and we go to up and it calls to for the result is OK, true and this is true.
然后我们将这个值增加到 1。
Then we increase this to this very value to one.
好的,您可以看到,现在让我们进行重置。
OK, you can see and now let's make the reset is.
反对者。
Conter.
让我们来一次错误的开始吧。
And let's make this false start once one.
并。
And to.
还有三个。
And three.
最后一个是假的,现在是真的,好吧,我们实现了这个值,但你仍然可以,因为为什么,嗯,这只是增加贬值,而不是写入或吃得过饱到这个值,因为,嗯,这是本地内存。
And the last one is false and now it's true, OK, and we implemented this value, but you can still one because of why, um, this is just incrementing disvalue and not writing or overeaten to this value because of, um, this is a local memory.
我需要将它定义到全局内存中。
I need to define it to global memory.
但我们需要什么暂时并不重要,我们需要了解的是向上和向上的控制。
But it doesn't matter for a moment what we need we need to understand it is up and up control.
这是工作。
It is working.
我们可以说,例如,嗯,也许我们需要像你一样看一下唐·汤姆特,嗯,看,我们需要在这里写,好吗?
And we can say, for example, um, maybe we need to take a look once to Don Tomter like you, um, see, t d we need to write here, OK?
这是反的。
And this is done counter.
类似的事情我们也可以再说一遍,比如说在这里计数,很多输入,比如说我们可以在这里说很多,嗯,值。
And also the similar thing we can say again, for example, in here count up and lot input, for example, we can say a lot, um, value to here.
例如,我们可以说计数器值,我们可以在这里说计数。
And this, for example, we can say counter value and we can say to here count.
向下。
Down.
好的。
OK.
并作为输出。
And as output.
数一数,你这样就行了,现在就到了,我要删除它。
Count one, you OK like this and now is here, I want to delete it.
好的。
OK.
它不允许我们这是计数器,它是放置你的计数器值,让我们开始定义它们或定义谈话以及全局内存。
It is not allowing to us this is counter that it is to put your counter value and let's start to define them or define talk as well as global memory.
这是比尔。
And this is Bill.
并且应该建立这个值。
And this value should be built.
这将是,嗯,全局内存和计数器值。
And this will be, um, global memory and counter value.
好的,这将是比尔,这将是全局内存,折扣值是。
OK, this will be Bill and this will be global memory and discounter value is.
好的,现在让我们下载这个向下计数器,呃,项目到我的模拟器,现在我们准备好了。
OK, now let's do a download this down counter, uh, project to my simulator and now we are ready.
现在您可以看到我们要加载哪一个。
Now you can see which one that we are going to load.
好的。
OK.
举例来说。
And for example.
例如,我们可以在这里说,时间,好吧,这对我们来说不是很多,现在我很抱歉。
We can say to here, for example, time, OK, and it is not a lot to us, I'm sorry now.
我只是想获得很多价值,但我们需要定义折扣价值和控制。
I'm just trying to a lot of value, but we need to define discounted value and control.
这一点也很相似。
This, too, is similar.
所以我需要将其更改为这个值。
So I need to change this to this value.
好吧,这是我的错误,这将是全局内存,好吧,现在,嗯,下载一次而不是。
OK, this was my mistake and this will be global memory and OK, now, um, do a download once and not.
然后再次。
And again.
好吧,好吧,现在是时候让我们看一下这卷了。
And OK, OK, so now this is time and let's look this volume.
我想要这个。
I would like this.
那么10年,好吗?
So 10 years, OK?
让我们把它变成假的,现在它是假的。
And let's make it false and now it's false.
我会说真话10次。
And 10 times I will say true.
你可以看到现在是九,一旦是七。
And you can see it is nine and once it is seven.
好的,现在也许我们可以将此值更改为 2,然后我们可以将此值添加到计数器中。
OK, so now maybe we can change this value to two and we can at this value to our counter.
现在让我们把它变成假,然后再往下走。
And now let's make it false and let's go down once more.
这是其中之一。
And this is one.
所以输出仍然是错误的。
So the output is still false.
再次,好吧,输出为 true,因为计数器值现在为零。
And once more, OK, the output is true because the counter value is zero now.
好的,那么这就是我们如何在这里使用Excel编程语言中的倒计时指令呢?
OK, so this is how can we use countdown instruction in Excel programming language in here?
宝拉,我已经看完这个视频了。
Paula, I'm finished for this video.
下一个视频见。
See you in the next video.